import kf_lib_v2_2 as lib
import math

headings = "N,NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW".split(",")

def deg_to_bearing(deg):
    
    
    divisions= 360.0 / len(headings)
    return headings[int(((deg + divisions/2) % 360)/divisions)]
    
if __name__ == "__main__":
    for deg in range(365): print deg, deg_to_bearing(deg)